﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Forms/FormAdmin.master" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="HRdex_Final.Forms.WebForm3" %>
<%@ Register assembly="EO.Web" namespace="EO.Web" tagprefix="eo" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
  <div>
    <table id="LeaveFill" align="center" 
            style="background-color: #FFFFFF; border-style: double; border-color: #0066FF" >

        <tr>
            <td colspan="4" style="text-align: left; font-size: xx-large;">
                Leave Form</td> 
        </tr>
         <tr>
            <td>
                <asp:Label ID="Label4" runat="server" Text="Leave ID"></asp:Label>
             </td>
            <td colspan="4">
                <asp:TextBox ID="txtLeaveID" runat="server" Width="445px"></asp:TextBox>
            </td>
         </tr>
         <tr>
            <td>
                Type of Leave:<asp:RequiredFieldValidator 
                    ID="RequiredFieldValidator2" runat="server" ControlToValidate="ddlLeave" 
                    ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
             </td>
            <td colspan="4">
                <asp:DropDownList ID="ddlLeave" runat="server" Height="36px" 
                    Width="458px" DataSourceID="catLeave" DataTextField="CatLeaveName" 
                    DataValueField="CatLeaveID">
                </asp:DropDownList>
                <asp:SqlDataSource ID="catLeave" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
                    SelectCommand="SELECT * FROM [catLeave]"></asp:SqlDataSource>
            </td>
           
         </tr>
         <tr>
            <td style="width: 180px">
            
                Employee No:<asp:RequiredFieldValidator 
                    ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtEmpNo" 
                    ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
             </td>
            <td colspan="4">
            
                <asp:TextBox ID="txtEmpNo" runat="server" Width="450px"></asp:TextBox>
             </td>
        </tr>
        <tr>
            <td style="width: 180px; height: 26px;">
            
                Name:<asp:RequiredFieldValidator 
                    ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtEmpName" 
                    ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td colspan="4" style="height: 26px">
            
                <asp:TextBox ID="txtEmpName" runat="server" Width="450px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 180px">
            
                Position<asp:RequiredFieldValidator 
                    ID="RequiredFieldValidator5" runat="server" ControlToValidate="ddlPosition" 
                    ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td colspan="4">
            
                <asp:DropDownList ID="ddlPosition" runat="server" DataSourceID="Position" 
                    DataTextField="catPositionsName" DataValueField="catPositionsID" Height="16px" 
                    Width="456px">
                </asp:DropDownList>
                <asp:SqlDataSource ID="Position" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
                    SelectCommand="SELECT * FROM [catPositions]"></asp:SqlDataSource>
            </td>
        </tr>
         <tr>
            <td style="width: 180px">
            
                Department<asp:RequiredFieldValidator 
                    ID="RequiredFieldValidator6" runat="server" ControlToValidate="ddlDept" 
                    ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" 
                    ControlToValidate="ddlCol" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                <br />
                <br />
                <br />
                College</td>
            <td colspan="4">
            
                <asp:DropDownList ID="ddlDept" runat="server" DataSourceID="Department" 
                    DataTextField="DepartmentName" DataValueField="DeptID" Height="27px" 
                    Width="456px">
                </asp:DropDownList>
                <asp:SqlDataSource ID="Department" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
                    SelectCommand="SELECT [DeptID], [DepartmentName] FROM [catDepartment]">
                </asp:SqlDataSource>
                <asp:DropDownList ID="ddlCol" runat="server" DataSourceID="college" 
                    DataTextField="CollegeName" DataValueField="CollegeID" Height="40px" 
                    Width="453px">
                </asp:DropDownList>
                <asp:SqlDataSource ID="college" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
                    SelectCommand="SELECT * FROM [catCollege]"></asp:SqlDataSource>
             </td>
        </tr>
         <tr>
            <td colspan="5">
            
                Date of Absent</td>
        </tr>
         <tr>
            <td>
                From<asp:RequiredFieldValidator 
                    ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtFrom" 
                    ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
             </td>
            <td>
                <asp:TextBox ID="txtFrom" runat="server" Width="142px" ontextchanged="Page_Load" 
                    ></asp:TextBox>
                <asp:CalendarExtender ID="dpFrom" runat="server" Enabled="True" 
                    TargetControlID="txtFrom">
                </asp:CalendarExtender>
            </td>
            <td>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</td>
            <td>
                Time</td>
            <td>
                <asp:DropDownList ID="ddl0Hour" runat="server">
                <asp:ListItem Value="1"></asp:ListItem>
                    <asp:ListItem Value="2"></asp:ListItem>
                    <asp:ListItem Value="3"></asp:ListItem>
                    <asp:ListItem Value="4"></asp:ListItem>
                    <asp:ListItem Value="5"></asp:ListItem>
                    <asp:ListItem Value="6"></asp:ListItem>
                    <asp:ListItem Value="7"></asp:ListItem>
                    <asp:ListItem Value="8" Selected="True"></asp:ListItem>
                    <asp:ListItem Value="9"></asp:ListItem>
                    <asp:ListItem Value="10"></asp:ListItem>
                    <asp:ListItem Value="11"></asp:ListItem>
                    <asp:ListItem>12</asp:ListItem>
                </asp:DropDownList>
                <asp:DropDownList ID="ddl0Min" runat="server">
                <asp:ListItem Value="00">00</asp:ListItem>
                    <asp:ListItem Value="05"></asp:ListItem>
                    <asp:ListItem Value="10"></asp:ListItem>
                    <asp:ListItem Value="15"></asp:ListItem>
                    <asp:ListItem Value="20"></asp:ListItem>
                    <asp:ListItem Value="25"></asp:ListItem>
                    <asp:ListItem Value="30"></asp:ListItem>
                    <asp:ListItem Value="35"></asp:ListItem>
                    <asp:ListItem Value="40"></asp:ListItem>
                    <asp:ListItem Value="45"></asp:ListItem>
                    <asp:ListItem Value="50"></asp:ListItem>
                    <asp:ListItem Value="55"></asp:ListItem>
                </asp:DropDownList>
            </td>
         </tr>
        <tr>
            <td>
                To<asp:RequiredFieldValidator 
                    ID="RequiredFieldValidator8" runat="server" ControlToValidate="txtTo" 
                    ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td>
                <asp:TextBox ID="txtTo" runat="server" Width="142px" ontextchanged="Page_Load"></asp:TextBox>
                <asp:CalendarExtender ID="dpTo" runat="server" Enabled="True" 
                    TargetControlID="txtTo">
                </asp:CalendarExtender>
                <asp:Label ID="Label5" runat="server" Text="lblLeave"></asp:Label>
                <asp:CheckBoxList ID="CheckBoxList1" runat="server">
                    <asp:ListItem>Whole Day</asp:ListItem>
                </asp:CheckBoxList>
            </td>
            <td>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</td>
            <td>
                Hours</td>
            <td>
                <asp:DropDownList ID="ddl1Hour" runat="server">
                <asp:ListItem Value="1"></asp:ListItem>
                    <asp:ListItem Value="2"></asp:ListItem>
                    <asp:ListItem Value="3"></asp:ListItem>
                    <asp:ListItem Value="4"></asp:ListItem>
                    <asp:ListItem Value="5" Selected="True"></asp:ListItem>
                    <asp:ListItem Value="6"></asp:ListItem>
                    <asp:ListItem Value="7"></asp:ListItem>
                    <asp:ListItem Value="8"></asp:ListItem>
                    <asp:ListItem Value="9"></asp:ListItem>
                    <asp:ListItem Value="10"></asp:ListItem>
                    <asp:ListItem Value="11"></asp:ListItem>
                    <asp:ListItem Value="12"></asp:ListItem>
                </asp:DropDownList>
                <asp:DropDownList ID="ddl1Min" runat="server">
                <asp:ListItem Value="00">00</asp:ListItem>
                    <asp:ListItem Value="05"></asp:ListItem>
                    <asp:ListItem Value="10"></asp:ListItem>
                    <asp:ListItem Value="15"></asp:ListItem>
                    <asp:ListItem Value="20"></asp:ListItem>
                    <asp:ListItem Value="25"></asp:ListItem>
                    <asp:ListItem Value="30"></asp:ListItem>
                    <asp:ListItem Value="35"></asp:ListItem>
                    <asp:ListItem Value="40"></asp:ListItem>
                    <asp:ListItem Value="45"></asp:ListItem>
                    <asp:ListItem Value="50"></asp:ListItem>
                    <asp:ListItem Value="55"></asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td style="width: 180px">
            
                &nbsp;</td>
            <td colspan="4">

                Total:<asp:RequiredFieldValidator 
                    ID="RequiredFieldValidator12" runat="server" ControlToValidate="txtTotalDays" 
                    ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" 
                    ControlToValidate="ddlDaysMonthsYear" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
&nbsp;<asp:TextBox ID="txtTotalDays" runat="server"  ></asp:TextBox>
                    <asp:DropDownList ID="ddlDaysMonthsYear" runat="server" 
                        DataSourceID="daysmonthsyear" DataTextField="Name" DataValueField="dmyID">
                    </asp:DropDownList>
                 
&nbsp;<asp:SqlDataSource ID="daysmonthsyear" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
                    SelectCommand="SELECT * FROM [catDaysMonthsYear]"></asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td>
                Reason<asp:RequiredFieldValidator 
                    ID="RequiredFieldValidator9" runat="server" ControlToValidate="txtReason" 
                    ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                <br />
            </td>
            <td colspan="4">
                <asp:TextBox ID="txtReason" runat="server" TextMode="MultiLine" Width="453px"></asp:TextBox>
            </td>
        </tr>
         <tr>
            <td>
                Address During Leave<asp:RequiredFieldValidator ID="RequiredFieldValidator10" 
                    runat="server" ControlToValidate="txtAddress" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                <br />
             </td>
            <td colspan="4">
                <asp:TextBox ID="txtAddress" runat="server" TextMode="MultiLine" Width="453px"></asp:TextBox>
            </td>
            </tr>
            </table>

            <%--PANEL--%>

            <asp:Panel ID="leaveRead" runat="server" Visible="false">
            
              <table id="lvfread" align="center" 
            style="background-color: #FFFFFF; border-style: double; border-color: #0066FF" >

        <tr>
            <td colspan="4" style="text-align: left">
                Leave Form</td> 
        </tr>
         <tr>
            <td>
            Leave ID
             </td>
            <td colspan="4">
                <asp:Label ID="lvf_lblLeaveID" runat="server" Width="445px"></asp:Label>
            </td>
         </tr>
         <tr>
            <td>
                Type of Leave
             </td>
            <td colspan="4">
                <asp:Label ID="lvf_lblLeave" runat="server">
                </asp:Label>
              
            </td>
           
         </tr>
         <tr>
            <td style="width: 180px">
            
                Employee No
             </td>
            <td colspan="4">
            
                <asp:Label ID="lvf_lblEmpNo" runat="server" Width="450px"></asp:Label>
             </td>
        </tr>
        <tr>
            <td style="width: 180px; height: 26px;">
            
                Name:
            </td>
            <td colspan="4" style="height: 26px">
            
                <asp:Label ID="lvf_lblEmpName" runat="server" Width="450px"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 180px">
            
                Position
            </td>
            <td colspan="4">
            
                <asp:Label ID="lvf_lblPos" runat="server" >
                </asp:Label>
               
            </td>
        </tr>
         <tr>
            <td style="width: 180px">
            
                Department
               
             </td>
            <td colspan="4">
            
                <asp:Label ID="lvf_lblDept" runat="server" >
                </asp:Label>
              
               
             </td>
        </tr>

        <tr>
            <td style="width: 180px">
            
               College
               
             </td>
            <td colspan="4">
            
                <asp:Label ID="lvf_lblcol" runat="server" >
                </asp:Label>
                </td>
                </tr>
         <tr>
            <td colspan="5">
            
                Date of Absent</td>
        </tr>
         <tr>
            <td>
                From
             </td>
            <td>
                <asp:Label ID="lvf_lblFrom" runat="server" Width="142px"  
                    ></asp:Label>
               
            </td>
            <td>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</td>
            <td>
                Time</td>
            <td>
                <asp:Label ID="lvf_lblFromTime" runat="server">
               
                </asp:Label>
                
            </td>
         </tr>
        <tr>
            <td>
                To
            </td>
            <td>
                <asp:Label ID="lvf_lblTo" runat="server" ></asp:Label>
               
            </td>
            <td>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</td>
            <td>
                Hours</td>
            <td>
                <asp:Label ID="lvf_lblToTime" runat="server">
                
                </asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 180px">
            
                &nbsp;</td>
            <td colspan="4">

                Total:

&nbsp;<asp:Label ID="lvf_lblTotalDays" runat="server"  ></asp:Label>
                    
                 

            </td>
        </tr>
        <tr>
            <td>
                Reason
                <br />
            </td>
            <td colspan="4">
                <asp:Label ID="lvf_lblReason" runat="server" TextMode="MultiLine" Width="453px"></asp:Label>
            </td>
        </tr>
         <tr>
            <td>
                Address During Leave
                <br />
             </td>
            <td colspan="4">
                <asp:Label ID="lvf_lblAddress" runat="server" TextMode="MultiLine" Width="453px"></asp:Label>
            </td>
            </tr>
            </table>
            
            </asp:Panel>


           <%-- 2ND TABLE--%>
            <table style="width: 686px">
         <tr>
            <td colspan="5">
                <asp:Label ID="lblConfirmationMessage" runat="server" 
                    style="font-style: italic; color: #0000FF"></asp:Label>
                <br />
             </td>
            </tr>
        <tr>
            <td colspan="5" style="text-align: center">
                <asp:Button ID="btnSave" runat="server" Text="Send" onclick="btnSave_Click" />
                <asp:Button ID="btnClear" runat="server" Text="Clear" 
                    CausesValidation="False" onclick="btnClear_Click" />
            </td>
        </tr>
       
    </table>
        <table id="approval" align="right">
    <tr>
        <td style="height: 59px">
                &nbsp;</td>
        <td style="height: 59px">
            <asp:Label ID="lblApprovalChair" runat="server" Text="Chairperson/Supervisors"></asp:Label>
        </td>
        <td style="height: 59px">
            <asp:DropDownList ID="ddlApprovalHead" runat="server">
                <asp:ListItem></asp:ListItem>
                <asp:ListItem Value="Denied">Denied</asp:ListItem>
                <asp:ListItem Value="Approved">Approved</asp:ListItem>
            </asp:DropDownList>
            <asp:TextBox ID="txtAppChairleave" runat="server" ></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
                &nbsp;</td>
        <td>
            <asp:Label ID="lblApprovalDean" runat="server" Text="Directors/Dean"></asp:Label>
        </td>
        <td>
            <asp:DropDownList ID="ddlApprovalDean" runat="server">
                <asp:ListItem></asp:ListItem>
                 <asp:ListItem Value="Denied">Denied</asp:ListItem>
                <asp:ListItem Value="Approved">Approved</asp:ListItem>
            </asp:DropDownList>
            <asp:TextBox ID="txtAppDeanleave" runat="server" ></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
                &nbsp;</td>
        <td>
            <asp:Label ID="lblApprovalHR" runat="server" Text="HR Director"></asp:Label>
        </td>
        <td>
            <asp:DropDownList ID="ddlApprovalHR" runat="server">
                <asp:ListItem></asp:ListItem>
                  <asp:ListItem Value="Denied">Denied</asp:ListItem>
                <asp:ListItem Value="Approved">Approved</asp:ListItem>
            </asp:DropDownList>
            <asp:TextBox ID="txtAppHRleave" runat="server"></asp:TextBox>
        </td>
    </tr>     
    </table>
</div>
    <br />
    <br />
    <br />
            
                </asp:Content>
